/** 
 * Project Name:eleme-website 
 * File Name:ShopMenuService.java 
 * Package Name:com.eleme.service.impl 
 * Date:2017年12月27日下午9:33:41 
 * Copyright (c) 2017, fakedesigner@163.com All Rights Reserved. 
 * 
*/  
  
package com.eleme.service.impl;

import com.eleme.dao.IDaoFactory;
import com.eleme.dao.IMenuGoodsDao;
import com.eleme.entity.Goods;
import com.eleme.service.IShopMenuService;
import com.google.gson.GsonBuilder;

/** 
 * ClassName:ShopMenuService <br/> 
 * Function: TODO ADD FUNCTION. <br/> 
 * Reason:   TODO ADD REASON. <br/> 
 * Date:     2017年12月27日 下午9:33:41 <br/> 
 * @author   Pan 
 * @version   
 * @since    JDK 1.8 
 * @see       
 */
public class ShopMenuServiceImpl extends BaseServiceImpl<Goods> implements IShopMenuService {


	private IMenuGoodsDao dao;
	
	public ShopMenuServiceImpl(IDaoFactory factory) {
		super(factory.getMenuGoodsDao());
		dao = (IMenuGoodsDao) super.getDao();
	}
	
	
	
	public String getSpecsJSON(int shopid) {
		return new GsonBuilder().create().toJson(dao.getMenuGoods(shopid));
	}



	public String getShopMenuJSON(int shopid) {
		
		return new GsonBuilder().create().toJson(dao.getMenuGoods(shopid));
	}
	

}
